home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: MegaDisc
/
MegaDisc 06 (1988)(MegaDisc Digital Publishing)(AU)[m][WB].zip
/
MegaDisc 06 (1988)(MegaDisc Digital Publishing)(AU)[m][WB].adf
/
ARTICLES
/
AboutPrompts
< prev
next >
Wrap
Text File
|
1988-04-09
|
2KB
|
64 lines
Custom Prompts And Echoes
*************************
ED. NOTE: Anyone wanting to investigate this topic further might have
a look at previous Megadiscs through a Text Editor such as TxED, which
shows exactly what was done to get various effects. They couldn't be
done in this issue because PRINTEXT, the display utility, doesn't
handle them, at least with the ESC key. XICON, the previous display
utility, does so, but LESS gets upset if you use them.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Both the PROMPT and ECHO commands found in the C directory can be
modified to issue some of the ANSI command characters in order to
change the displayed text in both colour and style. By using the same
techniques mentioned above, you can add colour to the CLI prompt or
anything "echoed" to the screen.
To tell PROMPT or ECHO to accept the codes, a template of commands is
used.
This template is:
CSIstyle;forground;background
CSI is Control Sequence Introducer, which can be ESC [ or in hex 1b 5b;
for the PROMPT and ECHO commands, it is *e.
To modify the prompt try something like this:
PROMPT "*e[3;33;41mCLUB AMIGA BBS> *e[0m"
You should get an Italic "CLUB AMIGA BBS" in red on a white background.
Following are the numbers for different effects:
STYLE
0 = Plain Text
1 = Bold Face
3 = Italic
4 = Underline
7 = Inverse
FOREGROUND
30 = Default
31 = White
32 = Binary complement color (black for Workbench default
colors)
33 = Red
BACKGROUND
40 = Default
41 = White
42 = Binary complement color
43 = Red
You can also combine styles by entering each style number separated by
a semicolon.
~~~~~~~~~~~~~~~~~~~~~~~~~~~ END OF ABOUTPROMPTS ~~~~~~~~~~~~~~~~~~~~~~~~~~~